﻿/*
 * 2023/3/4
 * 会员注册dto，主要是模型验证
 * 
 * **/
using System.ComponentModel.DataAnnotations;

namespace Max.PH5_2008A.ShoppingCode.Dto
{
    public class MemberRegisterDto
    {
        public Guid Id { get; set; }
        public string? NickName { get; set; } //用于在登录后显示的账户昵称

        [Required(ErrorMessage ="手机号必填")]
        [StringLength(11,ErrorMessage ="手机号长度不对")]
        public string Phone { get; set; }  //用手机号做为登录账号


        [Required(ErrorMessage = "密码必填")]
        [StringLength(18,MinimumLength =6, ErrorMessage ="密码长度6到18位")]
        public string Password { get; set; } //密码，需要进行加密处理
        public int? Age { get; set; } //年龄
        public string? City { get; set; }
        public bool? Sex { get; set; }
    }
}